package menu

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/dto/base"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/base/menu"
)

type MenuService struct {
	menuRepo menu.MenuRepositoryIface
}

func NewMenuService(menuRepo menu.MenuRepositoryIface) MenuServiceIface {
	return &MenuService{menuRepo: menuRepo}
}

// 菜单列表
func (s *MenuService) MenuList(ctx context.Context, getVisibleMenu int64) ([]*base.MenuItem, error) {
	return s.menuRepo.MenuList(ctx, getVisibleMenu)
}
